package com.itheima;

public class Test7_2 {
    public static void main(String[] args) {
        //找素数案例
        int count = search(101,200);
        System.out.println("一共有"+count+"个素数");
    }
    public static int search(int start,int end){
        int count = 0;
        OUT:
        for (int i = start; i <=end ; i++) {
            for (int j = 2; j <i ; j++) {
                if (i%j==0){
                   continue OUT;
                }
            }
                count++;
            System.out.println(i);

        }
        return count;
    }
}
